import React, { useState } from 'react'
import { View, Text, Input, Image, Textarea } from '@tarojs/components'
import PageWrapper from '@/components/PageWrapper'
import './index.scss';
const Type = ({ data }: { data: any[] }) => {
  return (
    <View className="community-type-box">
      {data.map((item,index)  => (
        <View key={index} className={item.checked !== 1 ? 'community-type-item' : 'community-type-item-checked'}>
          <View className="community-type-title">{item.name}</View>
        </View>
      ))}
    </View>
  );
};
const Page = () => {
// 分类
  const typeList = [
    { name: '最新', index: 0 ,checked: 1},
    { name: '鉴定知识', index: 1 ,checked: 0},
    { name: '精华', index: 2 ,checked: 0},
  ];
  return (
    <PageWrapper title="酒类鉴定学堂" showBack={true} backgroundColor='#F0F0F0'>
      <View className="title-img">
        <Image  src={require(`../../../assets/user/wine-bg.png`)}/>
      </View>
      <Type data={typeList}></Type>
      <View className="box">
        <View className="item">
          <View className="user-box">
            <Image  src={require(`../../../assets/user/my-service.png`)}/>
            <View className="user">
              <View className="name">鉴酒大师</View>
              <View className="time">2025-05-12 11:03:25</View>
            </View>

          </View>
          <View className="content-box">
            <View className="content">在A的快速发展中，数字人(DigitalHumans)作为一种新兴技 术，越来越受到关注。无论是在虚拟现实(VR)、增强现实(</View>
            <View className="file-box">
              <Image  src={require(`../../../assets/user/PDF.png`)}/>
              <View className="file">在A的快速发展中，数字人(DigitalHumans)作为一种新兴技 术，越来越受到关注。无论是在虚拟现实(VR)、增强现实(</View>
            </View>
            <View className="file-box">
              <Image  src={require(`../../../assets/user/PDF.png`)}/>
              <View className="file">在A的快速发展中，数字人(DigitalHumans)作为一种新兴技 术，越来越受到关注。无论是在虚拟现实(VR)、增强现实(</View>
            </View>
          </View>
          <View className="fun-box">
            <View className="fun">
              <Image  src={require(`../../../assets/user/like.png`)}/>
              <View className="num">111</View>
            </View>
            <View className="fun m-l-120">
              <Image  src={require(`../../../assets/user/comment.png`)}/>
              <View className="num">111</View>
            </View>
            <View className="fun m-l-120">
              <Image  src={require(`../../../assets/user/share.png`)}/>
              <View className="num">111</View>
            </View>
          </View>
        </View>
      </View>
    </PageWrapper>
  )
}

export default Page
